/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cput.tp.patterns.creational.abstractfactory;

import com.cput.tp.patterns.creational.factorymethod.Animal;
import com.cput.tp.patterns.creational.factorymethod.Cat;
import com.cput.tp.patterns.creational.factorymethod.Dog;

/**
 *
 * @author Malotana
 */
public class MammalFactory extends SpeciesFactory{

    @Override
    public Animal getAnimal(String type) {
     if("dog".equals(type)){
            return new Dog();
        }else {
            return new Cat();
        }    
    }  
}
